package cn.gson.school.entity.caiwu;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.gson.school.entity.xitong.UserInfoEntity;
/**
 * 收款详情表
 * @author lc
 *
 */
@Entity
@Table(name = "tb_shoukuaninfo")
public class ShouKuanInfoEntity {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "shoukuaninfo_id")
	private Long shoukuanInfoId;//收款详情记录编号
	
	/*@OneToOne
	@JoinColumn(name = "shoukuan_id")
	private ShouKuanEntity shoukuanId;//收款记录编号
*/	
	@Column(name = "yingshou_money")
	private Double  money;//应收金额
	
	@Column(name = "owed_money")
	private Double owedMoney;//还欠多少
	
	@Column(name = "pay_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date payTime;//支付时间
	
	@Column(name = "add_plus")
	private String addPlus;//备注
	 
	@OneToOne
	@JoinColumn(name = "userinfo_id")
	private UserInfoEntity userinfoId;// 操作人编号

	public Long getShoukuanInfoId() {
		return shoukuanInfoId;
	}

	public void setShoukuanInfoId(Long shoukuanInfoId) {
		this.shoukuanInfoId = shoukuanInfoId;
	}

	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public Double getOwedMoney() {
		return owedMoney;
	}

	public void setOwedMoney(Double owedMoney) {
		this.owedMoney = owedMoney;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date date) {
		this.payTime = date;
	}

	public String getAddPlus() {
		return addPlus;
	}

	public void setAddPlus(String addPlus) {
		this.addPlus = addPlus;
	}

	public UserInfoEntity getUserinfoId() {
		return userinfoId;
	}

	public void setUserinfoId(UserInfoEntity userinfoId) {
		this.userinfoId = userinfoId;
	}

	@Override
	public String toString() {
		return "ShouKuanInfoEntity [shoukuanInfoId=" + shoukuanInfoId + ", money=" + money + ", owedMoney=" + owedMoney
				+ ", payTime=" + payTime + ", addPlus=" + addPlus + ", userinfoId=" + userinfoId + "]";
	}
	
	
}
